package com.qf.controller;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

public class MyJsonServiralizer extends JsonSerializer<Double> {
    //序列化属性值
    @Override
    public void serialize(Double money, JsonGenerator generator, SerializerProvider serializerProvider) throws IOException {
        generator.writeString("￥"+money);
    }
}
